package com.gi.product.error;

import com.gi.product.constant.ResultEnum;

/**
 * Created by lancf on 2019/7/8.
 */
public class ProductException extends RuntimeException {

    private Integer code;

    public ProductException(Integer code,String msg) {
        super(msg);
        this.code = code;
    }

    public ProductException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }
}
